import type { RouteConfig } from '../../typings/router';
import configController from '../controllers/config';

/**
 * 配置模块路由
 */
const configRoutes: RouteConfig[] = [
    {
        method: 'get',
        name: 'configInfo',
        path: '/config/info',
        middlewares: [configController.infoAction],
    },
    {
        method: 'get',
        name: 'configRetrieve',
        path: '/config/retrieve',
        middlewares: [configController.retrieveAction],
    },
    {
        method: 'post',
        name: 'configAdd',
        path: '/config/add',
        middlewares: [configController.addAction],
    },
    {
        method: 'put',
        name: 'configUpdate',
        path: '/config/update',
        middlewares: [configController.updateAction],
    },
    {
        method: 'delete',
        name: 'configDelete',
        path: '/config/delete',
        middlewares: [configController.deleteAction],
    },
];

export default configRoutes;
